<template>
    <el-form ref="form" label-width="80px">
        <el-form-item label="商品专辑">
            <el-upload
                    action="https://jsonplaceholder.typicode.com/posts/"
                    list-type="picture-card"
                    :on-preview="handlePictureCardPreview"
                    :on-remove="handleRemove">
                <i class="el-icon-plus"></i>
            </el-upload>
        </el-form-item>
        <el-form-item label="商品介绍">
            <d2-ueditor v-model="text"/>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" @click="toNext">下一步,添加SKU配置/价格</el-button>
            <el-button>取消</el-button>
        </el-form-item>
    </el-form>
</template>

<script>

    export default {
        name: "product-add-step2",
        data() {
            return {
                dialogImageUrl: '',
                dialogVisible: false,
                text: "hello"
            };
        },
        methods: {
            handleRemove(file, fileList) {
                console.log(file, fileList);
            },
            handlePictureCardPreview(file) {
                this.dialogImageUrl = file.url;
                this.dialogVisible = true;
            },
            toNext() {
                this.$emit('next')
            }
        }
    }
</script>

<style scoped>

</style>
